<template>
    <div class="wrapper appOperLog">
        <div style="padding-top:10px;padding-left:5px;text-align: left;">
            <el-form :inline="true" class="demo-form-inline">
                             <el-form-item>
                                <el-button icon="el-icon-refresh" type="primary" size="small" @click="query" >刷新</el-button>
                            </el-form-item>
                            <el-form-item style="text-align:right">
                                <p >
					                <span>共 <span>{{queryTotal}}</span> 条</span>
				                </p>
                            </el-form-item>
                        </el-form>
            <!--数据列表-->
            <el-table v-loading="loadingTable" :data="operateData" :show-header="true" highlight-current-row style="width: 100%;">
                <el-table-column prop="time" label="时间" sortable></el-table-column>
                <el-table-column prop="f3" label="操作类型" sortable></el-table-column>
                <el-table-column prop="Oper_Object_name" label="操作对象" sortable></el-table-column>
                <el-table-column prop="duration" label="持续时间" sortable></el-table-column>
                <el-table-column prop="sts" label="状态" sortable></el-table-column>
                <el-table-column prop="uname" label="操作者" sortable></el-table-column>
            </el-table>
        </div>
    </div>
</template>
<script>
// 消息通知组件
export default {
    data() {
        return {
            operateData: [
            ],
            queryTotal: 0,
            loadingTable: false,

        }
    },
    props: [
        //多个逗号隔开
        "appName"
    ],
    methods: {
        query() {
            let url = this.projectConfig.URL_API_OPERLOG_APP_QUERY;
            url+="?appName="+this.appName;
            this.loadingTable = true;
            this.httpClient.httpClientget(url).then((response) => {
                this.loadingTable = false;
                this.operateData = response.data;
                this.queryTotal = response.data.length;
            })
        }
    },
    mounted: function() {
        let _this = this;
        this.query();
    },
    //计算属性
    computed: {
    },
    //属性变化监听
    watch: {
        appName: {
            handler: function(val, oldval) {
                this.query();
            }
        }
    }
}
</script>
<style>

</style>